package com.gadgets.cm04.common;

import com.gadgets.framework.common.constant.GadgetsConstant;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-10-19
 *
 */
public class GadgetsCm04Constant {
    /**
     * 文件上传缓存
     */
    public static final String FILE_UPLOAD_CACHE_KEY = "fileUploadCache";
    /**
     * 文件下载缓存
     */
    public static final String FILE_DOWNLOAD_CACHE_KEY = "fileDownloadCache";
    /**
     * 规则作用域：文件名
     */
    public static final String REGIX_SCOPE_FILENAME = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_0;
    /**
     * 规则作用域：文件后缀
     */
    public static final String REGIX_SCOPE_SUFFIX = GadgetsConstant.NUMBER_CONSTANT.STR_NUMBER_1;

    /**
     * 文件上传校验规则
     * W-白名单(白名单和黑名单都会校验)
     * B-黑名单(只校验黑名单)
     */
    public static final String UPLOAD_REGIX_RULE = "fm04.upload.regixType";

    /**
     * 规则类型常量
     * 00-上传黑名单
     * 01-上传白名单
     * 10-下载黑名单
     * 11-下载白名单
     */
    public static final class REGIX_TYPE_CONSTANT{
        /**
         * 上传黑名单
         */
        public static final String REGIX_UPLOAD_BLACK = "00";
        /**
         * 上传白名单
         */
        public static final String REGIX_UPLOAD_WHITE = "01";
        /**
         * 下载黑名单
         */
        public static final String REGIX_DOWNLOAD_BLACK = "10";
        /**
         * 下载白名单
         */
        public static final String REGIX_DOWNLOAD_WHITE = "11";
    }

}
